<template>
  <tabbar style="position: fixed;bottom: 0px;">
      <tabbar-item style="text-decoration: none;" v-for="item in iconList" :key="item.text" :link="item.link" :littlenew="curSelect" :selected="curSelect === item.key">
          <i slot="icon" class="iconfont" :class="item.class"></i>
          <span slot="label">{{item.text}}</span>
      </tabbar-item>
  </tabbar>
</template>
<script>
import { Tabbar, TabbarItem } from 'vux'
export default {
  props: {
    curSelect: {
      type: String,
      default: 'index'
    }
  },
  data () {
    return {
      iconList: [
        {
          key: 'index',
          text: '首页',
          class: 'icon-shouye',
          link: '/'
        },
        {
          key: 'task',
          text: '任务',
          class: 'icon-renwu',
          link: '/task'
        },
        {
          key: 'other',
          text: '其他',
          class: 'icon-report',
          link: '/other'
        }
      ]
    }
  },
  components: {
    Tabbar,
    TabbarItem
  }
}
</script>